Skip to content

feat: detect upstream toolchain updates - #239

Open
TomasArrachea wants to merge 7 commits into
mainfrom
tomasarrachea-partial-install-detection
Open

feat: detect upstream toolchain updates#239
TomasArrachea wants to merge 7 commits into
mainfrom
tomasarrachea-partial-install-detection

Conversation

@TomasArrachea

@TomasArrachea TomasArrachea commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a warning so the user are notified when the toolchain has changed upstream and needs updating.

midenup show list and midenup list now mark an installed toolchain with (update available) if running midenup update would change it. This replaces the (partially installed) marker, which permanently flagged every default install of 0.15.0+ because it compared against the full channel instead of what the user asked for. Update status is derived on the fly from the upstream manifest.

Base automatically changed from tomasarrachea-progress-reporting to main September 1, 2026 14:58
@TomasArrachea
TomasArrachea force-pushed the tomasarrachea-partial-install-detection branch from bedffec to b2aa4f7 Compare September 1, 2026 15:56
@TomasArrachea TomasArrachea changed the title fix: partial install detection feat: detect upstream toolchain updates Sep 1, 2026
@TomasArrachea
TomasArrachea marked this pull request as ready for review September 1, 2026 21:43
@TomasArrachea
TomasArrachea marked this pull request as draft September 1, 2026 21:55
@TomasArrachea
TomasArrachea marked this pull request as ready for review September 2, 2026 15:45

@bitwalker bitwalker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but Codex found two issues that check out that we should fix - see comments for details

Comment thread src/commands/update.rs Outdated
let normalized = |component: &Component| {
let mut component = component.clone();
match &mut component.version {
Authority::Path { last_modification, .. } => *last_modification = None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Normalize relative path authorities before comparing definitions

Installation rewrites a relative Authority::Path.path using config.working_directory.join(path) in refresh_path_modification_times, but this comparison only removes last_modification. Consequently, an unchanged manifest with "version": {"kind": "path", "path": "src"} shows (update available) in both list and show list immediately after a successful install: the stored absolute path differs from the raw relative path. Running update 0.15.0 --path-update=all succeeds but never clears the marker, because metadata updates preserve the installed authority. This was reproduced against this PR's head. Please account for the install-time path transformation when comparing definitions, while preserving the requirement that listing does not access component sources.

Comment thread src/commands/list.rs Outdated
Comment on lines +25 to +28
None if channel
.migrates_from
.as_ref()
.is_some_and(|old| state.get(old).is_some()) =>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Honor same-version precedence when displaying migration updates

Checking only whether the predecessor is installed does not match the updater's counterpart-selection rule. If upstream contains both installed 0.15.0 and an uninstalled 0.16.0 declaring migrates_from: "0.15.0", this branch prints 0.16.0 (update available). However, upstream_counterpart_raw prefers the still-published 0.15.0, so update 0.15.0 reports Toolchain 0.15.0 is up to date and performs no migration; show list also reports no update. This was reproduced against this PR's head, and the false marker remains after updating. Please use the same counterpart-selection rule as the updater when deciding whether a successor represents an available update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants